#include "GameStateManager.h"

using namespace Game;

StateManager* StateManager::mInstance;

StateManager::StateManager()
{
	mStateNow =6500;
	mPrevState=6500;
}

StateManager& StateManager::GetInstance()
{
	if(mInstance==0)
	{
		mInstance=new StateManager();

	}
	return *mInstance;
}


unsigned int StateManager::GetState()
{
	return mStateNow;
}

void StateManager::SetState(unsigned int newstate)
{
	mStateNow=newstate;
}

void StateManager::HoldState()
{
	mPrevState=mStateNow;
}

bool StateManager::IsStateChanging()
{
	if(mPrevState!=mStateNow)
		return true;
	else
		return false;
}
